

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'; // 引入 Element Plus
import 'element-plus/dist/index.css'; // 引入 Element Plus 样式
import App from './App.vue'

// 按需引入组件
import {
    ElButton,
    ElTable,
    ElTableColumn,
    ElInput,
    ElSelect,
    ElOption,
    ElTooltip,
    ElMessage,
  } from 'element-plus';

// import router from './router'

const app = createApp(App)
app.use(createPinia())
app.use(ElementPlus);

// 按需注册组件
app.component("ElButton", ElButton);
app.component("ElTable", ElTable);
app.component("ElTableColumn", ElTableColumn);
app.component("ElInput", ElInput);
app.component("ElSelect", ElSelect);
app.component("ElOption", ElOption);
app.component("ElTooltip", ElTooltip);

// 挂载 ElMessage
app.config.globalProperties.$message = ElMessage;

app.mount('#app')
